<?php
/******************************************************************************/
define('WDK_PATH'	,	dirname(dirname(dirname(__FILE__))).'/');
/******************************************************************************/
require WDK_PATH.'core/UnitTestConf.php';
require dirname(__FILE__).'/Class.php';
define('NAME', str_replace(WDK_PATH.'helpers/', '', dirname(__FILE__)));
class UnitTest extends PHPUnit_Framework_TestCase
{
	public function testEncrypt()
	{
		$c = Cl::helper('amcrypt');
		
		$str = 'abc';
		
		// Encryption
		$estr1 = $c->e($str, FALSE); 	// Encryption does not change
		$estr2 = $c->e($str, TRUE);		// Encryption changes
		
		// Decryption
		$dstr1 = $c->d($estr1);
		$dstr2 = $c->d($estr2);
		
		echo "\n";
		echo $str."\n";
		echo $estr1."\n";
		echo $dstr1."\n";
		
		echo "\n";
		echo $str."\n";
		echo $estr2."\n";
		echo $dstr2."\n";
	}
}
?>